import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sainbainu/common/models/request/pager_request.dart';
import 'package:sainbainu/common/models/response/content_response.dart';
import 'package:sainbainu/common/models/response/group_detail_response.dart';
import 'package:sainbainu/common/repositories/content_repository.dart';
import 'package:sainbainu/common/repositories/group_repository.dart';

class GroupDetailState {
  late ScrollController scrollController;

  /// 头部是否折叠
  final isCollapsed = false.obs;

  /// 头部标题透明度
  final titleOpacity = 0.0.obs;

  /// 头部展开高度
  double headerExpandedHeight = 0;

  /// =================================================

  int? groupId;
  String? uniqueTag;
  String? groupCover;

  /// 组仓库
  late GroupRepository groupRepository;

  /// 组详情
  GroupDetailResponse groupDetail = GroupDetailResponse();

  /// 是否已加入小组
  var isJoin = false.obs;

  bool showHeaderInfo = false;

  ///================================

  /// 刷新控制器
  late EasyRefreshController refreshController;

  /// 分页
  late PagerRequest pagerRequest;

  /// 内容列表
  ContentListResponse contentList = ContentListResponse(
    rows: [],
    total: 0,
  );

  /// 是否有更多
  bool hasMore = false;

  /// 内容仓库
  late ContentRepository contentRepository;
}
